package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //发布动态
    String publish(Movement movement);
    //查询个人动态
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);
    //根据用户id，查询用户好友发布的动态列表
    List<Movement> findFriendMovements(Integer page, Integer pagesize, Long userId);
    //随机获取多条动态数据
    List<Movement> randomMovements(Integer counts);
    //根据pid数组查询动态
    List<Movement> randomMovementsByPids(List<Long> pids);
    //查询单条动态
    Movement findById(String movementId);
    //根据用户id，查询
    PageResult findByUserId(Long uid, Integer state, Integer page, Integer pagesize);
    //更新动态状态
    void update(String movementId, int state);
}
